package edu.suda.xsap.dto.convert;

import edu.suda.xsap.dto.CardTypeDto;
import edu.suda.xsap.entity.CardType;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Mapper(componentModel = "spring")
public interface CardTypeConvert {
    @Mapping(source="id", target = "id")
    @Mapping(source="cardName", target = "MembershipCardName")
    @Mapping(source="price", target = "Price")
    @Mapping(source="type", target = "CardType")
    @Mapping(source="totalTime", target = "AvailableTimes")
    @Mapping(source="totalDay", target = "AvailableDays")
    @Mapping(source="description", target = "DescribeInfo")
    @Mapping(source="note", target = "note")

    CardTypeDto toDto(CardType cardType);
    List<CardTypeDto> toDtoList(List<CardType> cardTypeList);

}
